#!/bin/bash
# contab vsftpd

/etc/init.d/vsftpd  stop
sleep 2
# get process id
pid= ps -ef | grep vsftpd | grep -v grep | awk '{print $2}'
if [ -n $pid ]; then
  echo "INFO [`date`]::vsftpd stop info" >> /tmp/ftplog
  echo "`ps -ef | grep vsftpd | grep -v grep`" >> /tmp/ftplog
else
  echo "ERROR [`date`]::vsftpd stop error!" >> /tmp/ftplog
fi
